#include<iostream>
#include"DateTime.h"

 
//@author A0080451N
void DateTime::setMin(int mins){
	_mins = mins;
}

//@author A0080451N
int DateTime::getMin(){
return _mins;
}

//@author A0080451N
std::string DateTime::getMinString(){
	std::ostringstream ss;
	if(_mins<10)
		ss<<_mins <<"0";
	else
		ss<<_mins;
	return ss.str();

}


//@author A0080451N
void DateTime::setHour(int hour){
	_hour = hour;
}

//@author A0080451N
int DateTime::getHour(){
return _hour;
}

//@author A0080451N
void DateTime::setDay(int day){
	_day = day;
}

//@author A0080451N
int DateTime::getDay(){
	return _day;
}

//@author A0080451N
void DateTime::setMonth(int month){
	_month = month;
}

//@author A0080451N
int DateTime::getMonth(){
return _month;
}

//@author A0080451N
void DateTime::setYear(int year){
	 _year = year;
}

//@author A0080451N
int DateTime::getYear(){
return _year;
}

//@author A0080451N
void DateTime::setDate(int day, int month, int year){
_day = day;
_month = month;
_year = year;
}

//@author A0080451N
void DateTime::setTime (int hour, int mins){
_hour = hour;
_mins = mins;
}

//@author A0080451N
void DateTime::setEmpty(bool b){
	_empty = b;
}

//@author A0080451N
bool DateTime::isEmpty(){
	return _empty;
}
//@author A0080451N
void DateTime::printDateTime(){
std::cout<<getYear()<<"/"<<getMonth()<<"/"<<getDay()<<"/"<<getHour()<<":"<<getMin()<<" ";

return;
}
//@author A0080451N
std::string DateTime::writeDateTimeToString(){
	std::ostringstream ss;
	ss<<getDay()<<"/"<<getMonth()<<"/"<<getYear()<<"; "<<getHour()<<":"<<getMinString()<<"\n";
	return ss.str();
}
